const mock = require('mockjs');
const mongoose = require("mongoose");
const orderModel = mongoose.model('orders')
async function test() {
    let result = await orderModel.find();
    if (!result.length) {
        let { orders } = mock.mock({
            'orders|10': [{
                'status|1': [true, false],
                usersId: '6059bbbd90fe74352401842f',
                'time': new Date(),
                seatingId: '605c3f05fed3c95dedb91c73',
                scheduleId: '605aab342e6f6d7da85f7811',
                movieId: '60599a05c8b72736dddf47d4',
                theaterId: '605c4ae0f68cfa3a34c6a247',
                cinemaId: '605c34cf6f59808a508c8c2f'
            }]
        });
        orderModel.create(orders);
    }
}
test();



